/*********************************************************************
* 文件名称: wxshell.h
* 说 明: 
* 作 者: lyfan
* 时 间: 2021.08.10
*********************************************************************/ 
#ifndef __WXSHELL_H__
#define __WXSHELL_H__


#ifdef __cplusplus
#if __cplusplus
extern "C"{
#endif
#endif /* __cplusplus */


/***************************************  shell lib entry  ****************************************/

typedef struct _wx_algo_info{
	void *algo_start;
	uint32_t algo_len;
	uint32_t magic;
} wx_algo_info;

/*----------------------------------------------------------------------------
 * IOCTL Interface
 *----------------------------------------------------------------------------*/
// The magic number used to distinguish IOCTL's for our device
#define ALGO_IOCTL_MAGIC				'O'

// The number of IOCTL's implemented, used for verification
#define ALGO_NUM_IOCTLS				3
#define WX_TRACE_DECT				_IOR(ALGO_IOCTL_MAGIC, 0, int32_t)
#define WX_DYN_LOAD					_IO(ALGO_IOCTL_MAGIC, 1)
#define WX_ALGOMODULE_LOAD			_IOW(ALGO_IOCTL_MAGIC, 2, wx_algo_info)


#define		DES_NONE_STR				"none"
#define		DES_ECB_STR					"ecb"
#define		DES_ECB3_STR				"ecb3"
#define		DES_CBC_STR					"cbc"
#define		CRYPTMAGIC					"WEIZ"


typedef enum _DES_CRYPT_TYPE{
	DES_NONE = 0,
	DES_ECB,
	DES_ECB3,
	DES_CBC,

	DES_MAX = 255,
} DES_CRYPT_TYPE;

char *cryptstring[] = {
	DES_NONE_STR,
	DES_ECB_STR,
	DES_ECB3_STR,
	DES_CBC_STR,
};

typedef struct __WX_CRYPT_HEAD
{
	char 			szMagic[4];
	uint32_t		filelen;
	uint8_t			cryptype;
	uint8_t			reserved[3];
} WX_CRYPT_HEAD;




#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif /* __cplusplus */

#endif /* __WXSHELL_H__ */
